package com.omg.api.result.header;

import com.omg.constant.ResponseCode;

public abstract class Header {

	private long respcode;

	public long getRespcode() {
		return respcode;
	}

	public void setRespcode(long respcode) {
		this.respcode = respcode;
	}

	public void setRespcode(String respcode) {
		if (respcode != null && !respcode.isEmpty()) {
			try {
				this.respcode = Long.parseLong(respcode);
			} catch (NumberFormatException e) {
				this.respcode = ResponseCode.AP_E_Info_UnkownError;
			}
		} else {
			this.respcode = ResponseCode.AP_E_Info_UnkownError;
		}
	}
}
